<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>person</title>
	</head>
	<body>
		<script type="text/javascript">
			function person(name,age,work,address){
			this.name=name;
			this.age=age;
			this.work=work;
			this.address=address;
				this.into=function(){
				var str=this.name+"\n"+this.age+"\n"+this.work+"\n"+this.address;
				alert(str);
			}
			}
				var person1=new person("郎晓明","38","中国内地男演员、歌手","中国北京海淀区")
				person1.into();
			
			function Person2(){
				
			}
			Person2.prototype.name="郎晓明";
			Person2.prototype.age="38";
			Person2.prototype.work="中国内地男演员、歌手";
			Person2.prototype.address="中国北京海淀区";
			Person2.prototype.into=function(){
				var str=this.name+"\n"+this.age+"\n"+this.work+"\n"+this.address;
				alert(str);
			}
			var person2=new Person2();
			person2.into();
		</script>
	</body>
</html>
